import { defineStore } from 'pinia'
import { getCurrQuarter } from '@/utils/date.js'
import { usePermissionStore } from '@/stores/permission'
const { user } = usePermissionStore()
export const useStatisticsFromStore = defineStore('statisticsFrom', () => {
  const enumerationType = reactive({
    infoTypeData: []
  })
  const { start, end } = getCurrQuarter()
  const statistics = reactive({
    timeSpendRank: {
      areaCode: user.areaCode,
      createTimeStart: start,
      createTimeEnd: end
    }
  })
  return {
    enumerationType,
    statistics
  }
})
